import 'package:flutter/material.dart';
import 'package:flutter_corner/banner_view.dart';

class ArticlePage extends StatefulWidget {
  @override
  _ArticlePageState createState() => _ArticlePageState();
}

class _ArticlePageState extends State<ArticlePage> {
  var data =  ["https://www.wanandroid.com/blogimgs/50c115c2-cf6c-4802-aa7b-a4334de444cd.png",
  "https://www.wanandroid.com/blogimgs/90c6cc12-742e-4c9f-b318-b912f163b8d0.png",
  "https://www.wanandroid.com/blogimgs/ab17e8f9-6b79-450b-8079-0f2287eb6f0f.png"];

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          backgroundColor: Colors.blueAccent,
          title: Center(
            child: Text("首页"),
          ),
        ),
        body: Container(
          height: 180,
          child: BannerView(data: data),
        ),
        ),
    );
  }
  Widget _buildItem(int index){
    if(index==0){
      return BannerView(
        data:data
      );
    }
    return Text("11111");
  }
}
